;; EX-49.scm - Synthetic Piano (JMcC)

(Mix.fill 
 6
 (lambda ()
   (let* ((pitch (random-integer 36 90))
	  (strike (Impulse.ar (Add 0.1 (random 0.4)) (random two-pi) 0.1))
	  (hammerEnv (Decay2.ar strike 0.008 0.04)))
     (Pan2.ar (Mix.fill 
	       3 (lambda (i)
		   (let* ((detune (ref '(-0.05 0 0.04) i))
			  (delayTime (FDiv 1 (MIDICPS (Add pitch detune))))
			  (hammer (LFNoise2.ar 3000 hammerEnv)))
		     (CombL.ar hammer delayTime delayTime 6))))
	      (Sub (FDiv (Sub pitch 36) 27) 1)))))
